<extend name="Public/base"/>

<block name="body">
  
    <div class="main-title">
        <h2>留存分析</h2>
    </div>

    <div class="cf">
        <div class="fl">
            <form action="" method="post">
            <div class="form-item form-group">
                <label class="item-label">开始日期<span class="check-tips">
                </span></label>
                <div class="controls">
                    <input type="text" class="text input-large form-control time" name="from" value="{$from}" placeholder="开始日期">
                </div>
            </div>
            <div class="form-item form-group">
                <label class="item-label">结束日期<span class="check-tips">
                </span></label>
                <div class="controls">
                    <input type="text" class="text input-large form-control time" name="to" value="{$to}" placeholder="结束日期">
                </div>
            </div>
            <button class="btn submit-btn btn-success btn-block" id="submit" type="submit" target-form="form">查询</button>
            </form>
        </div>
    </div>

    <div class="tab-content">
        <form>
        <div class="tab-pane in">
            <div class="data-table table-striped">
            <table class="table table-bordered">
            <thead>
                <tr>
                    <th class="">日期</th>
                    <th class="">新增</th>
                    <th class="">一天后</th>
                    <th class="">两天后</th>
                    <th class="">三天后</th>
                    <th class="">四天后</th>
                    <th class="">五天后</th>
                    <th class="">六天后</th>
                    <th class="">七天后</th>
                </tr>
            </thead>
            <tbody>
                <volist name="retens" id="r">
                    <tr>
                        <td>{$key}</td>
                        <td>{$r[0]}</td>
                        <volist name="r[1]" id="v">
                            <td><gt name="v" id="0">{:sprintf('%0.4f',$v*100)}%</gt></td>
                        </volist>
                    </tr>
                </volist>
            </tbody>
            </table>
            </div>
        </div>
        </form>    
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Video/index')}');
        showTab();
        $(function(){
            $('.time').datetimepicker({
                format: 'yyyy-mm-dd',
                language:"zh-CN",
                minView:2,
                autoclose:true
            });
        });
    </script>
</block>
